﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace WindowsFormsApp1
{
    public partial class Form4 : Form
    {
        public Form4()
        {
            InitializeComponent();
        }
        //取消
        private void button2_Click(object sender, EventArgs e)
        {
            Form2 form2 = new Form2();
            form2.Show();
            this.Hide();

        }
        //注册
        private void button1_Click(object sender, EventArgs e)
        {

        }

        private void button1_Click_1(object sender, EventArgs e)
        {
            string text1 = textBox1.Text.ToString();
            string text3 = textBox2.Text.ToString();
            if (text1 != null && text3 != null)
            {
                UsersAndPoWOrAllAdd usersAndPoWOrAllAdd = new UsersAndPoWOrAllAdd();
                var add = string.Format("insert into Articles (Title,Author,CreatedTime)VALUES('{0}',{1},(SELECT GETDATE() AS CurrentDateTime))", text1, text3);
                var dt = usersAndPoWOrAllAdd.GetUSPOW(add);
            }
            else { MessageBox.Show("为空或者说有错误", "提示"); }

        }
    }
}
